package com.fm.common.wediget

import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout

/**
 *
 * @Author:         ly2
 * @CreateDate:     2021/1/11
 * @Description:    解决嵌套列表点击事件无效
 *
 */
class LySwipeRefreshLayout : SwipeRefreshLayout {

    constructor(context: Context) : super(context)
    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)

    override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
        if (isRefreshing) {
            return true
        }
        return super.dispatchTouchEvent(ev)
    }
}